﻿using System;
using System.Linq.Expressions;
using System.Web.Mvc;
using BoneSystem.Extensions.Form;

namespace BoneSystem.Extensions.Ribbon
{
    public static class Ribbon
    {
        public static RibbonLayout<T, TProperty> BsForm<T, TProperty>(this HtmlHelper<T> htmlHelper,
            Expression<Func<T, TProperty>> expression,Action<FormSettings> formSettings)
        {
            return new RibbonLayout<T, TProperty>()
            {
                RibbonSettings= (RibbonSettings) formSettings.Target,
                HtmlHelper = htmlHelper
            };
        }
    }
}
